home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
Dots & Pixels
/
sources
/
vretrace.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-29
|
598b
|
27 lines
// #include <Retrace.h>
//
// This is the VBL routine which must be present in 'VBL ' resource #128
// for class 'vretrace' to work properly
//
// Note for PowerMac users: the vertical retrace manager isn't native
// yet under System 7.5.1, so running this in 68K assembly is the fastest
// we can do for now.
//
void main( void)
{
asm {
;
; the VBL_proc proper:
;
; ensure that we will be restarted:
;
MOVE.W -0x06(A0),D0 ; our VBL count
LEA 0x0A(A0),A1 ; find address of vblCount
MOVE.W D0,(A1) ; reset
;
; Increase numtimes_run:
;
ADDQ.L #0x01,-0x04(A0)
}
}